package com.loan.log.config;

import com.loan.log.environment.SDKSystemPropertiesApplicationLister;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author shiguang on 2022/6/22 14:11
 */
@Configuration
public class LogConfig {

    @Value("${loan.system.id}")
    private String systemId = "1";

    @Bean
    @ConditionalOnMissingBean({SDKSystemPropertiesApplicationLister.class})
    public SDKSystemPropertiesApplicationLister sdkSystemPropertiesApplicationLister() {
        return new SDKSystemPropertiesApplicationLister(systemId);
    }
}
